home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Interactive Media Design Review 1999
/
Interactive Media Design Review 1999.iso
/
pc
/
Demos
/
Bombardier_PC
/
DATACH.CST
/
00218_Script_paramSprite
< prev
next >
Wrap
Text File
|
1999-03-07
|
2KB
|
50 lines
property mySpritev, hiliteSpritev, myRectv
on new me
set mySpritev = the spriteNum of me
set hiliteSpritev = mySpritev -2
set myRectv = the rect of sprite mySpritev
puppetSprite hiliteSpritev, true
set the loc of sprite hiliteSpritev = point(-1000, -1000)
sendSprite((mySpritev - 1), #register, me)
return me
end
on checkIfInsidev me
set myRectv = the rect of sprite mySpritev
set theMouseLoc = point(the mouseH, the mouseV)
if inside(theMouseLoc, myRectv) then
set myMember = the member of sprite mySpritev
set myTop = the top of sprite mySpritev
set theH = the left of sprite mySpritev
set adjustedMouseV = (the mouseV - myTop)
set theLine = locVToLinePos(member myMember, adjustedMouseV)
set theV = linePosToLocV(member myMember, theLine)
set the loc of sprite hiliteSpritev = point(theH, (theV+myTop))
set the width of sprite hiliteSpritev = the width of member myMember
else
set the loc of sprite hiliteSpritev = point(-1000, -1000)
end if
updateStage
end
on getPlaneNamev me
set theMouseLoc = point(the mouseH, the mouseV)
if inside(theMouseLoc, myRectv) then
set hiliteV = the top of sprite hiliteSpritev - the top of sprite mySpritev
set myMember = the member of sprite mySpritev
set theLine = locVToLinePos(member myMember, hiliteV)
set theText = the text of member myMember
set textLine = line theLine of theText
set the loc of sprite hiliteSpritev = point(-1000,-1000)
else
set textLine = ""
end if
return textLine
end